<?php
html::printPath(
    array(
        'viRegistration.form-title' => 'admin/viRegistration/all',
        text::get('viRegistration.registration_number', $viRegistration['id']) => 'admin/viRegistration/display?id=' . $viRegistration['id'],
        'viRegistration.keyDepositEdit-title' => ''
    ),
    'viRegistration.keyDepositEdit-desc'
);
$msg->printMessages();

$currencyMark = text::get('currency.mark-' . $viRegistration['currency_code']);

$fb = new FormBuilder('viRegistration', $formData);
$fb->setAction('/admin/viRegistration/keyDepositSave');
$fb->hidden('vi_registration_id');
$fb->decimal('key_deposit')->required()->appendix($currencyMark);
if ($viRegistration['key_deposit']) {
    $fb->yesNoBox('is_key_returned')->noEmptyOption();
}
$fb->submitButton();
$fb->write();